This page last changed on May 03, 2007 by scytacki.

AWT doesn't work with SWT on osx. It also requres version 1.5 on linux.

Related page on telscenter telscenter swt_awt

AWT and SWT bug status

The bug about the osx problem is here:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=67384

The current state of this bugs seems to be this:
with this build of the jdk 1.4.2_09-232, an awt and swt can be opened by the same application.
with this java update: Java 5 Release 4 DP 6, an awt and swt window can be opened by the same application.

Embedding one component in the other has not been addressed yet. But it seems like it is possible.

Ramifications

JNLP will not work with swt applications. Even with the fixed versions of jdk on osx jnlp does not work. Apple appears to be working on this. But most likely this will only work on Tiger.

SwingWT

http://swingwt.sf.net

SwingWT is a way to run swing applications inside of swt. However it requires changing the package names that your classes are using for the swing classes. The project has a classloader that does this dynamically. Or it can be done at deployment time. I dont believe it will handle native thirdparty awt components (flash plugin, quicktime plugin, ...). But those could probably be ported to swt.

Also, from a legal point of view commits to swingwt need to be care not to use Suns swing code.

Related Links

http://www-128.ibm.com/developerworks/java/library/j-2dswt/ - info on using awt images in swt.
http://www.holongate.org/ - a java2d implemention using swt.

Alternatives

I have started on a SWT version of a AWT Toolkit: SWT Toolkit

Misc

Interesting eclipse based project.
http://iv.slis.indiana.edu/sw/

That project was found on the bug report. It is a eclipse based scientific visulation platform. It might have a lot of overlap with the type of things we are doing.

Document generated by Confluence on Jan 27, 2014 16:56